/*	Copyright (c) 2010 MIEM (http://miem.edu.ru/)
 *
 *	Authors:
 *		* Andrey Shtykovskiy    ( ashty@itas.miem.edu.ru      )
 *		* Edward Klyshinsky     ( klyshinsky@itas.miem.edu.ru )
 *		* Sergey R. Tumkovsky   ( srt@itas.miem.edu.ru        )
 *
 *	This file is part of MOAN (morphology analysis) software.
 *
 *	MOAN is free software: you can redistribute it and/or modify it 
 *	under the terms of the GNU General Public License as published 
 *	by the Free Software Foundation, either version 3 of the License, 
 *	or (at your option) any later version.
 *
 *	This library is distributed in the hope that it will be useful,
 *	but WITHOUT ANY WARRANTY; without even the implied warranty of
 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *	Lesser General Public License for more details.
 *
 *	You should have received a copy of the GNU General Public License 
 *	along with MOAN. If not, see http://www.gnu.org/licenses/.
 */



#ifndef __GRAMMEME_HPP_GUARD__
#define __GRAMMEME_HPP_GUARD__

namespace moan {

	template< typename value_type>
	struct grammeme {

		typedef unsigned int id_type;
		
		id_type id;
		value_type value;

		grammeme() 
			: id(0) {	}

		grammeme(const value_type& value_, id_type id_)
			: value(value_), id(id_) {	}

		~grammeme() {
			value.~value_type();
		}

		void from( const grammeme& grammeme_ ) {
			id = grammeme_.id;
			value = grammeme_.value;
		}

	}; /* struct gramemme */

} /* namespace moan */

#endif /* __GRAMMEME_HPP_GUARD__ */